package com.wkck.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wkck.domain.LoginUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface LoginUserMapper extends BaseMapper<LoginUser> {

    /**
     * 判断用户是否存在
     */

    @Select("select * from user where username = #{username}")
    LoginUser existUser(LoginUser loginUser);

    /**
     * 登录 判断密码是否正确
     * @param loginUser
     * @return
     */

    @Select("select * from user where username = #{username} and password = #{password}")
    LoginUser checkUserPassword(LoginUser loginUser);

    @Select("select * from user where username = #{username}")
    LoginUser getMsgByUserName(@Param("username") String username);
}
